home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 4233 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: god.bel.alcatel.be!nlev00!barnhoorn
  2. From: barnhoorn@nlev00 ()
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: File sizes
  5. Date: 26 Feb 1996 07:50:57 GMT
  6. Organization: Alcatel Bell
  7. Distribution: world
  8. Message-ID: <4grop1$puv@btmpjg.god.bel.alcatel.be>
  9. References: <4gd9pu$cpr@mn5.swip.net> <WXQ7y*5+f@yaps.rhein.de> <4gjs20$i68@btmpjg.god.bel.alcatel.be> <Dn81zD.H5M.0.-s@cs.vu.nl>
  10. Reply-To: barnhoorn@nlev00 ()
  11. NNTP-Posting-Host: 138.203.178.61
  12. X-Newsreader: mxrn 6.18-10
  13.  
  14.  
  15. In article <Dn81zD.H5M.0.-s@cs.vu.nl>, irmen@cs.vu.nl (Irmen de Jong) writes:
  16. |> On 23 Feb 1996 07:57:52 GMT barnhoorn@nlev00 (barnhoorn@nlev00) wrote:
  17. |> : |> > What's the best way of finding out the size of a file? Do I have to use 
  18. |> : |> > Examine()
  19. |> : ..or do it in ANSI-C, by opening the file, seeking to the end of it
  20. |> : and getting the number of bytes returned from fseek().
  21. |> Aaaargh why does nobody use fstat()? Seeking to the end of a many-megabyte-file
  22. |> can take ages, especially on floppy. fstat() (and dos.library/Examine()) are
  23. |> instantaneous, AFAIK.
  24.  
  25. I admit that fseek() might take a long time to return. But I think
  26. fseek() will return the real filesize, also on XPK-devices, because
  27. it has to be unpacked.
  28. Is fstat() a function that decrunches the file also?
  29.  
  30. ---------------------------------------------------------------------------
  31. Jaco Barnhoorn               barnie@xs4all.nl
  32. Software Test Engineer       barnhoorn%nlev00@btmv56.se.bel.alcatel.be
  33. Alcatel Telecom Systems
  34. Rijswijk, The Netherlands
  35. ---------------------------------------------------------------------------
  36.